<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'test.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<script type="text/javascript" src="dwr/util.js"></script>
		<script type="text/javascript" src="dwr/engine.js"></script>
		<script type="text/javascript" src="dwr/interface/RdcAjaxProxy.js"></script>
		<script type="text/javascript" src="res/js/func.js"></script>
		<script type="text/javascript" src="res/js/widget.js"></script>
		<script type="text/javascript" src="res/js/component.js"></script>
		<link rel="stylesheet" type="text/css" href="res/css/widget.css">
		<link rel="stylesheet" type="text/css" href="res/css/layout.css">
		<script type="text/javascript" src="res/openwysiwyg/scripts/wysiwyg.js"></script>
		<script type="text/javascript" src="res/openwysiwyg/scripts/wysiwyg-settings.js"></script>
		
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	<style type="text/css">
		.select {}
		.select option{padding:5px;}
	</style>
	</head>

	<body>
		<!-- 
		<textarea id="textarea1"></textarea>
		<br>
		<input type="text" id="mail" onblur=""/>
		<br>
		<input type="button" onclick="alert($('mail').focus());" value="OK"/>
		<script type="text/javascript">
			//WYSIWYG.attach('textarea1', small); // default setup
			
		</script>
		 -->
		<div style='width:300px;height:200px;border:1px solid blue;text-align:left;'>
			需要TA的同意后才能加为好友<br><br>
			<label>好友请求附言：</label><br><textarea class='input-text' rows='3' cols='40'>附加信息(50字以内)</textarea>
		</div>
		<input type="button" value="OK" onclick="req.show();"/>
		<select class="select"><option>1</option><option>2</option></select>
	
		<fieldset>
         <legend>你想在梦之都学习的编程语言:</legend>    
         <label for="multipleselect">你想在梦之都学习的编程语言</label>
         <select size="10" multiple="multiple" id="multipleselect" name="multipleselect">
             <option>XHTML</option>
             <option>CSS</option>
             <option>JAVASCRIPT</option>
             <option>XML</option>
             <option>PHP</option>
             <option>C#</option>
             <option>JAVA</option>
             <option>C++</option>
             <option>PERL</option>
         </select>
         <label for="WebDesign">选择一个你在梦之都最想学的</label>
     	<select id="WebDesign" name="WebDesign">
         <optgroup label="client">
             <option value="HTML">HTML</option>
             <option value="CSS">CSS</option>
             <option value="javascript">javascript</option>
         </optgroup>
         <optgroup label="server">
             <option value="PHP">PHP</option>
             <option value="ASP">ASP</option>
             <option value="JSP">JSP</option>
         </optgroup>
         <optgroup label="database">
             <option value="Access">Access</option>
             <option value="MySQL">MySQL</option>
             <option value="SQLServer">SQLServer</option>
         </optgroup>
     </select>
     
       </fieldset> 
       
       <table width="80%" border="1">
     <caption style="text-align:left;color:red;">
         域名数量介绍
     </caption>
     <tr>
         <th>www.dreamdu.com</th>
         <th>.com域名的数量</th>
         <th>.cn域名的数量</th>
         <th>.net域名的数量</th>
     </tr>
     <tr>
         <td>2003年</td>
         <td>1000</td>
         <td>2000</td>
         <td>3000</td>
     </tr>
     <tr>
         <td>2004年</td>
         <td>4000</td>
         <td>5000</td>
         <td>6000</td>
     </tr>
     <tr>
         <td>2005年</td>
         <td>7000</td>
         <td>8000</td>
         <td style="padding:10px;border:1px solid red;">你好<br>nihao<br></td>
     </tr>
       </table>
       
       <dl>
             <dt>www</dt>
                 <dd>World Wide Web的缩写.</dd>
             <dt>dreamdu</dt>
                 <dd>梦之都.</dd>
                 <dd>www的:).</dd>
             <dt>com</dt>
             <dt>com.cn</dt>
             <dt>cn</dt>
             <dd>这都是域名的后缀.</dd>
         </dl>
         
         <div style="padding:10px;border:1px solid red;">你好<br>nihao<br></div>
	</body>

<script>
	//PromptDialog.relocate(20,400);
/*
	function save(){
		var task = new LifeTask;
		task.content = "hello";
		task.planId = "123";
		task.aspirantId = "111111111111111";
		RdcAjaxProxy.createProxy("task", function(result){
			alert("result: " + result);
			if(result){
				RdcAjaxProxy.save(task, function(data){
					if(data == null){
						alert("failed to save");
					}
					else {
						alert(data.content);
					}
				});
			}
		});
	}
	
	var win = new PropmtWindow("错误提示", "确定要删除吗", 2);	
	//win.addAction(createConfirmButton(win));
	win.show();	
	
	
	function createConfirmButton(win){
		var btn = document.createElement("input");		
		btn.type = "button";
		btn.className = "confirmBtn";
		btn.value = "确定";
		btn.onclick = function(){
			// _shield.removeChild(_dlgBox);
			//win.fade(1);
			win.dispose();
		};
		
		return btn;
	}
	
	var menu = new DropMenu($("testArea"), "更多操作", "100px");
	var item = menu.createItem("完成");
	item.onclick = function(){
		alert("completed");
	};
	
	menu.addItem(item);
	item = menu.createItem("取消");
	item.onclick = function(){
		alert("canceled");
	};
	menu.addItem(item);
	
	*/	
	req = new RequestPopup();
	/*
	Base = function(){
		this.name1	 = "base.1";
	};
	
	Base.prototype.set = function(name){
		this.name1	 = name;
	};
	
	Base.prototype.say = function(){
		alert(this.name1);
	};
	
	b = new Base();
	b.set("hello");
	b.say();
	
	Cat = function(){
		this.name = "cat.1";
	}
	
	Cat.prototype.set = function(name){
		this.name	 = name;
	};
	
	Cat.prototype.say = function(){
		alert(this.name + ".cat");
	};
	
	cat = new Cat();
	cat.set("good");
	cat.say();
	
	
	var params = '3';
	alert(typeof params);
	alert(RDC.util.isString(params));
	alert(params.length);
	*/
        var Sys = {};
        var ua = navigator.userAgent.toLowerCase();
        if (window.ActiveXObject)
            Sys.ie = ua.match(/msie ([\d.]+)/)[1]
        else if (document.getBoxObjectFor)
            Sys.firefox = ua.match(/firefox\/([\d.]+)/)[1]
        else if (window.MessageEvent && !document.getBoxObjectFor)
            Sys.chrome = ua.match(/chrome\/([\d.]+)/)[1]
        else if (window.opera)
            Sys.opera = ua.match(/opera.([\d.]+)/)[1]
        else if (window.openDatabase)
            Sys.safari = ua.match(/version\/([\d.]+)/)[1];
       
        //以下进行测试
        if(Sys.ie) document.write('IE: '+Sys.ie);
        if(Sys.firefox) document.write('Firefox: '+Sys.firefox);
        if(Sys.chrome) document.write('Chrome: '+Sys.chrome);
        if(Sys.opera) document.write('Opera: '+Sys.opera);
        if(Sys.safari) document.write('Safari: '+Sys.safari);

</script>
</html>
